//-----------------------------------------------------------------------
// <copyright file="TaskSolvedEventArgs.cs" company="Numbrella foundation">
// Copyright (c) Numbrella foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Numbrella.Core
{
	using System;
	using System.Collections.Generic;
	
	/// <summary>
	/// Represents class for containing <see cref="ProblemBase.TaskSolved"/> event data.
	/// </summary>
	public class TaskSolvedEventArgs : EventArgs
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="TaskSolvedEventArgs"/> class.
		/// </summary>
		/// <param name="taskId">Identifier of the task that has been solved.</param>
		/// <param name="userNames">List of the names of the users who solves the task.</param>
		public TaskSolvedEventArgs(int taskId, IEnumerable<string> userNames)
		{
			if (userNames == null)
				throw new ArgumentNullException("userNames");

			this.TaskId = taskId;
			this.UserNames = userNames;
		}

		/// <summary>
		/// Gets identifier of the task that has been solved.
		/// </summary>
		public int TaskId { get; private set; }

		/// <summary>
		/// Gets list of the names of the users who solves the task.
		/// </summary>
		public IEnumerable<string> UserNames { get; private set; }
	}
}